﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Data;

namespace GPCSC.Web.CM
{
    public partial class QYS : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                F_bound();
            }
        }
        protected void F_bound()
        {
            string ids = Usual.f_querystringToString("ids");
            Hashtable htable = new Hashtable();
            htable.Add("@id", ids);
            DataSet ds = new SqlReadXml().ReaderDataSet("sel_qy_bykid", htable);
            if (ds != null)
            {
                if (ds.Tables.Count > 0)
                {
                    UIFactory.UIFactory_Set(this, ds.Tables[0]);
                }
            }
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            string ids = Usual.f_querystringToString("ids");
            Hashtable hta = f_getElements();
          //  hta.Add("IsBs", 0);
            SQLServerDAL.databyhtable dtable = new SQLServerDAL.databyhtable();
            dtable.databyhtables(hta, "update", "QiYe", "QYID", ids);
            Response.Write("<script>alert('更新成功');</script>");
        }
        public Hashtable f_getElements()
        {

            base.o_uiTable.Clear();
            base.o_uiTable = UIFactory.UIFactory_Get(this);
            return base.o_uiTable;
        }
    }
}